using Godot;
using MyCraft2;

public partial class PositionLabel : RichTextLabel
{
    public Vector3 PositionInText
    {
        set
        {
            var vec3I = (Vector3I)value;
            var chunkPosition = ChunkManager.GetChunkPosition(vec3I);
            Text =
                $"世界坐标: [color=red]{value.X:0.00}[/color] [color=green]{value.Y:0.00}[/color] [color=blue]{value.Z:0.00}[/color]\n" + 
                $"方块坐标: [color=red]{vec3I.X}[/color] [color=green]{vec3I.Y}[/color] [color=blue]{vec3I.Z}[/color]\n" + 
                $"区块坐标: [color=red]{chunkPosition.X}[/color] [color=blue]{chunkPosition.Y}[/color]\n";
        }
    }
}